﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace LynxBlogAPI.Models.Mapping
{
    public class BlogDataMap : EntityTypeConfiguration<BlogData>
    {
        public BlogDataMap()
        {
            this.HasKey(t => t.blogid);

            this.Property(t => t.blogid).HasColumnName("BlogId").HasMaxLength(50).IsRequired();
            this.Property(t => t.username).HasColumnName("UserName").HasMaxLength(50).IsRequired();
            this.Property(t => t.blogname).HasColumnName("BlogName").HasMaxLength(100).IsRequired();
            this.Property(t => t.url).HasColumnName("Url").HasMaxLength(250).IsRequired();
            this.Property(t => t.license).HasColumnName("License").HasMaxLength(20);
            this.ToTable("tblBlogData");
        }
    }
}